package com.xxy.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xxy.entity.Order;
import com.xxy.entity.Product;
import com.xxy.entity.dto.OrderDTO;
import com.xxy.entity.dto.ProductQueryDTO;
import com.xxy.entity.vo.ProductVO;
import com.xxy.result.PageResult;
import com.xxy.result.Result;

import java.util.List;

public interface IProductService extends IService<Product> {

    void saveProduct(Product product);

    void update(Product product);

    PageResult query(ProductQueryDTO productQueryDTO);

    List<ProductVO> queryByFilter(ProductQueryDTO productQueryDTO);

    ProductVO queryById(Integer id);

    Result<String> buyProduct(OrderDTO orderDTO);

    Result<String> placeOrder(Long ordersId);

    Result<String> refund(Long ordersId);
}
